package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
	"SPC/ModelImplementation"
)

type ChangeSalariedTransaction struct {
	AbstractTransactions.ChangeClassificationTransaction
	itsSalary float64
}

func NewChangeSalariedTransaction(empid int, salary float64)*ChangeSalariedTransaction{
	n := &ChangeSalariedTransaction{
		*AbstractTransactions.NewChangeClassificationTransaction(empid),
		salary,
	}
	n.ChangeClassificationTransaction.GetClassification = n.GetClassification
	n.ChangeClassificationTransaction.GetSchedule = n.GetSchedule
	return n
}

func (c *ChangeSalariedTransaction) GetClassification() Model.PaymentClassification{
	return ModelImplementation.NewSalariedClassification(c.itsSalary);
}

func (c *ChangeSalariedTransaction) GetSchedule() Model.PaymentSchedule {
	return &ModelImplementation.MonthlySchedule{}
}
